/* 
 * File:   6502_OpcodeMap.h
 * Author: juliano
 *
 * Created on April 17, 2012, 11:31 AM
 */

#ifndef NES6502_OPCODEMAP_H
#define	NES6502_OPCODEMAP_H

#include "6502.h"

        {brk, AM_RELATIVE,      2, 7, 1, 0},      //0x00
        {ora, AM_INDIRECT_X,    2, 6, 0, 0},      //0x01
        {jam, AM_IMPLIED,       0, 0, 0, 0},      //0x02
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0x03
        {jam, AM_IMPLIED,       0, 0, 0, 0},      //0x04
        {ora, AM_ZERO_PAGE,     2, 3, 0, 0},      //0x05
	{asl, AM_ZERO_PAGE,     2, 5, 0, 1},       //0x06
        {jam, AM_IMPLIED,       0, 0, 0, 0},      //0x07
        {php, AM_IMPLIED,       1, 3, 0, 0},      //0x08
	{ora, AM_IMMEDIATE,     2, 2, 0, 0},      //0x09
	{asl, AM_ACCUMULATOR,   1, 2, 0, 1},       //0x0A
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0x0B
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0x0C
	{ora, AM_ABSOLUTE,      3, 4, 0, 0},      //0xOD
	{asl, AM_ABSOLUTE,      3, 6, 0, 1},       //0x0E
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0x0F
	{bpl, AM_RELATIVE,      2, 2, 2, 0},      //0x10
	{ora, AM_INDIRECT_Y,    2, 5, 0, 0},      //0x11
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0x12
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0x13
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0x14
	{ora, AM_ZERO_PAGE_X,   2, 4, 0, 0},      //0x15
	{asl, AM_ZERO_PAGE_X,   2, 6, 0, 1},       //0x16
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0x17
	{clc, AM_IMPLIED,       1, 2, 0, 0},      //0x18
	{ora, AM_ABSOLUTE_Y,    3, 4, 0, 0},      //0x19
	{nop, AM_IMPLIED,       1, 2, 0, 0},      //0x1A
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0x1B
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0x1C
	{ora, AM_ABSOLUTE_X,    3, 4, 0, 0},      //0x1D
	{asl, AM_ABSOLUTE_X,    3, 7, 0, 1},       //0x1E
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0x1F
	{jsr, AM_ABSOLUTE,      0, 6, 1, 1},       //0x20
	{and, AM_INDIRECT_X,    2, 6, 0, 0},      //0x21
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0x22
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0x23
	{bit, AM_ZERO_PAGE,     2, 3, 0, 0},      //0x24
	{and, AM_ZERO_PAGE,     2, 3, 0, 0},      //0x25
	{rol, AM_ZERO_PAGE,     2, 5, 0, 1},       //0x26
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0x27
	{plp, AM_IMPLIED,       1, 4, 0, 0},      //0x28
	{and, AM_IMMEDIATE,     2, 2, 0, 0},      //0x29
	{rol, AM_ACCUMULATOR,   1, 2, 0, 1},       //0x2A
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0x2B
	{bit, AM_ABSOLUTE,      3, 4, 0, 0},      //0x2C
	{and, AM_ABSOLUTE,      3, 4, 0, 0},      //0x2D
	{rol, AM_ABSOLUTE,      3, 6, 0, 1},       //0x2E
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0x2F
	{bmi, AM_RELATIVE,      2, 2, 2, 0},      //0x30
	{and, AM_INDIRECT_Y,    2, 5, 0, 0},      //0x31
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0x32
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0x33
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0x34
	{and, AM_ZERO_PAGE_X,   2, 4, 0, 0},      //0x35
	{rol, AM_ZERO_PAGE_X,   2, 6, 0, 1},       //0x36
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0x37
	{sec, AM_IMPLIED,       1, 2, 0, 0},      //0x38
	{and, AM_ABSOLUTE_Y,    3, 4, 0, 0},      //0x39
	{nop, AM_IMPLIED,       1, 2, 0, 0},      //0x3A
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0x3B
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0x3C
	{and, AM_ABSOLUTE_X,    3, 4, 0, 0},      //0x3D
	{rol, AM_ABSOLUTE_X,    3, 7, 0, 1},       //0x3E
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0x3F
	{rti, AM_IMPLIED,       0, 6, 1, 0},      //0x40
	{eor, AM_INDIRECT_X,    2, 6, 0, 0},      //0x41
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0x42
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0x43
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0x44
	{eor, AM_ZERO_PAGE,     2, 3, 0, 0},      //0x45
	{lsr, AM_ZERO_PAGE,     2, 5, 0, 1},       //0x46
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0x47
	{pha, AM_IMPLIED,       1, 3, 0, 0},      //0x48
	{eor, AM_IMMEDIATE,     2, 2, 0, 0},      //0x49
	{lsr, AM_ACCUMULATOR,   1, 2, 0, 1},       //0x4A
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0x4B
	{jmp, AM_ABSOLUTE,      0, 3, 1, 1},       //0x4C
	{eor, AM_ABSOLUTE,      3, 4, 0, 0},      //0x4D
	{lsr, AM_ABSOLUTE,      3, 6, 0, 1},       //0x4E
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0x4F
	{bvc, AM_RELATIVE,      2, 2, 2, 0},      //0x50
	{eor, AM_INDIRECT_Y,    2, 5, 0, 0},      //0x51
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0x52
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0x53
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0x54
	{eor, AM_ZERO_PAGE_X,   2, 4, 0, 0},      //0x55
	{lsr, AM_ZERO_PAGE_X,   2, 6, 0, 1},       //0x56
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0x57
	{cli, AM_IMPLIED,       1, 2, 0, 0},      //0x58
	{eor, AM_ABSOLUTE_Y,    3, 5, 0, 0},      //0x59
	{nop, AM_IMPLIED,       1, 2, 0, 0},      //0x5A
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0x5B
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0x5C
	{eor, AM_ABSOLUTE_X,    3, 4, 0, 0},      //0x5D
	{lsr, AM_ABSOLUTE_X,    3, 7, 0, 1},       //0x5E
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0x5F
	{rts, AM_IMPLIED,       0, 6, 1, 0},      //0x60
	{adc, AM_INDIRECT_X,    2, 6, 0, 0},      //0x61
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0x62
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0x63
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0x64
	{adc, AM_ZERO_PAGE,     2, 3, 0, 0},      //0x65
	{ror, AM_ZERO_PAGE,     2, 5, 0, 1},       //0x66
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0x67
	{pla, AM_IMPLIED,       1, 4, 0, 0},      //0x68
	{adc, AM_IMMEDIATE,     2, 2, 0, 0},      //0x69
	{ror, AM_ACCUMULATOR,   1, 2, 0, 1},       //0x6A
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0x6B
	{jmp, AM_INDIRECT,      0, 5, 1, 1},       //0x6C
	{adc, AM_ABSOLUTE,      3, 4, 0, 0},      //0x6D
	{ror, AM_ABSOLUTE,      3, 6, 0, 1},       //0x6E
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0x6F
	{bvs, AM_RELATIVE,      2, 2, 2, 0},      //0x70
	{adc, AM_INDIRECT_Y,    2, 5, 0, 0},      //0x71
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0x72
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0x73
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0x74
	{adc, AM_ZERO_PAGE_X,   2, 4, 0, 0},      //0x75
	{ror, AM_ZERO_PAGE_X,   2, 6, 0, 1},       //0x76
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0x77
	{sei, AM_IMPLIED,       1, 2, 0, 0},      //0x78
	{adc, AM_ABSOLUTE_Y,    3, 4, 0, 0},      //0x79
	{nop, AM_IMPLIED,       1, 2, 0, 0},      //0x7A
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0x7B
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0x7C
	{adc, AM_ABSOLUTE_X,    3, 4, 0, 0},      //0x7D
	{ror, AM_ABSOLUTE_X,    3, 7, 0, 1},       //0x7E
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0x7F
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0x80
	{sta, AM_INDIRECT_X,    2, 6, 0, 1},       //0x81
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0x82
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0x83
	{sty, AM_ZERO_PAGE,     2, 3, 0, 1},       //0x84
	{sta, AM_ZERO_PAGE,     2, 3, 0, 1},       //0x85
	{stx, AM_ZERO_PAGE,     2, 3, 0, 1},       //0x86
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0x87
	{dey, AM_IMPLIED,       1, 2, 0, 0},      //0x88
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0x89
	{txa, AM_IMPLIED,       1, 2, 0, 0},      //0x8A
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0x8B
	{sty, AM_ABSOLUTE,      3, 4, 0, 1},       //0x8C
	{sta, AM_ABSOLUTE,      3, 5, 0, 1},       //0x8D
	{stx, AM_ABSOLUTE,      3, 4, 0, 1},       //0x8E
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0x8F
	{bcc, AM_RELATIVE,      2, 2, 2, 0},      //0x90
	{sta, AM_INDIRECT_Y,    2, 6, 0, 1},       //0x91
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0x92
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0x93
	{sty, AM_ZERO_PAGE_X,   2, 4, 0, 1},       //0x94
	{sta, AM_ZERO_PAGE_X,   2, 4, 0, 1},       //0x95
	{stx, AM_ZERO_PAGE_Y,   2, 4, 0, 1},       //0x96
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0x97
	{tya, AM_IMPLIED,       1, 2, 0, 0},      //0x98
	{sta, AM_ABSOLUTE_Y,    3, 5, 0, 1},       //0x99
	{txs, AM_IMPLIED,       1, 2, 0, 0},      //0x9A
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0x9B
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0x9C
	{sta, AM_ABSOLUTE_X,    3, 5, 0, 1},       //0x9D
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0x9E
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0x9F
	{ldy, AM_IMMEDIATE,     2, 2, 0, 0},      //0xA0
	{lda, AM_INDIRECT_X,    2, 6, 0, 0},      //0xA1
	{ldx, AM_IMMEDIATE,     2, 2, 0, 0},      //0xA2
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0xA3
	{ldy, AM_ZERO_PAGE,     2, 3, 0, 0},      //0xA4
	{lda, AM_ZERO_PAGE,     2, 3, 0, 0},      //0xA5
	{ldx, AM_ZERO_PAGE,     2, 3, 0, 0},      //0xA6
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0xA7
	{tay, AM_IMPLIED,       1, 2, 0, 0},      //0xA8
	{lda, AM_IMMEDIATE,     2, 2, 0, 0},      //0xA9
	{tax, AM_IMPLIED,       1, 2, 0, 0},      //0xAA
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0xAB
	{ldy, AM_ABSOLUTE,      3, 4, 0, 0},      //0xAC
	{lda, AM_ABSOLUTE,      3, 4, 0, 0},      //0xAD
	{ldx, AM_ABSOLUTE,      3, 4, 0, 0},      //0xAE
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0xAF
	{bcs, AM_RELATIVE,      2, 2, 2, 0},      //0xB0
	{lda, AM_INDIRECT_Y,    2, 5, 0, 0},      //0xB1
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0xB2
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0xB3
	{ldy, AM_ZERO_PAGE_X,   2, 4, 0, 0},      //0xB4
	{lda, AM_ZERO_PAGE_X,   2, 4, 0, 0},      //0xB5
	{ldx, AM_ZERO_PAGE_Y,   2, 4, 0, 0},      //0xB6
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0xB7
	{clv, AM_IMPLIED,       1, 2, 0, 0},      //0xB8
	{lda, AM_ABSOLUTE_Y,    3, 4, 0, 0},      //0xB9
	{tsx, AM_IMPLIED,       1, 2, 0, 0},      //0xBA
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0xBB
	{ldy, AM_ABSOLUTE_X,    3, 4, 0, 0},      //0xBC
	{lda, AM_ABSOLUTE_X,    3, 4, 0, 0},      //0xBD
	{ldx, AM_ABSOLUTE_Y,    3, 4, 0, 0},      //0xBE
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0xBF
	{cpy, AM_IMMEDIATE,     2, 2, 0, 0},      //0xC0
	{cmp, AM_INDIRECT_X,    2, 6, 0, 0},      //0xC1
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0xC2
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0xC3
	{cpy, AM_ZERO_PAGE,     2, 3, 0, 0},      //0xC4
	{cmp, AM_ZERO_PAGE,     2, 3, 0, 0},      //0xC5
	{dec, AM_ZERO_PAGE,     2, 5, 0, 1},       //0xC6
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0xC7
	{iny, AM_IMPLIED,       1, 2, 0, 0},      //0xC8
	{cmp, AM_IMMEDIATE,     2, 2, 0, 0},      //0xC9
	{dex, AM_IMPLIED,       1, 2, 0, 0},      //0xCA
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0xCB
	{cpy, AM_ABSOLUTE,      3, 4, 0, 0},      //0xCC
	{cmp, AM_ABSOLUTE,      3, 4, 0, 0},      //0xCD
	{dec, AM_ABSOLUTE,      3, 6, 0, 1},       //0xCE
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0xCF
	{bne, AM_RELATIVE,      2, 2, 2, 0},      //0xD0
	{cmp, AM_INDIRECT_Y,    2, 5, 0, 0},      //0xD1
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0xD2
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0xD3
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0xD4
	{cmp, AM_ZERO_PAGE_X,   2, 4, 0, 0},      //0xD5
	{dec, AM_ZERO_PAGE_X,   2, 6, 0, 1},       //0xD6
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0xD7
	{cld, AM_IMPLIED,       1, 2, 0, 0},      //0xD8
	{cmp, AM_ABSOLUTE_Y,    3, 4, 0, 0},      //0xD9
	{nop, AM_IMPLIED,       1, 2, 0, 0},      //0xDA
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0xDB
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0xDC
	{cmp, AM_ABSOLUTE_X,    3, 4, 0, 0},      //0xDD
	{dec, AM_ABSOLUTE_X,    3, 7, 0, 1},       //0xDE
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0xDF
	{cpx, AM_IMMEDIATE,     2, 2, 0, 0},      //0xE0
	{sbc, AM_INDIRECT_X,    2, 6, 0, 0},      //0xE1
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0xE2
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0xE3
	{cpx, AM_ZERO_PAGE,     2, 3, 0, 0},      //0xE4
	{sbc, AM_ZERO_PAGE,     2, 3, 0, 0},      //0xE5
	{inc, AM_ZERO_PAGE,     2, 5, 0, 1},       //0xE6
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0xE7
	{inx, AM_IMPLIED,       1, 2, 0, 0},      //0xE8
	{sbc, AM_IMMEDIATE,     2, 2, 0, 0},      //0xE9
	{nop, AM_IMPLIED,       1, 2, 0, 0},      //0xEA
	{sbc, AM_IMMEDIATE,     2, 2, 0, 0},      //0xEB
	{cpx, AM_ABSOLUTE,      3, 4, 0, 0},      //0xEC
	{sbc, AM_ABSOLUTE,      3, 4, 0, 0},      //0xED
	{inc, AM_ABSOLUTE,      3, 6, 0, 1},       //0xEE
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0xEF
	{beq, AM_RELATIVE,      2, 2, 2, 0},      //0xF0
	{sbc, AM_INDIRECT_Y,    2, 5, 0, 0},      //0xF1
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0xF2
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0xF3
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0xF4
	{sbc, AM_ZERO_PAGE_X,   2, 4, 0, 0},      //0xF5
	{inc, AM_ZERO_PAGE_X,   2, 6, 0, 1},       //0xF6
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0xF7
	{sed, AM_IMPLIED,       1, 2, 0, 0},      //0xF8
	{sbc, AM_ABSOLUTE_Y,    3, 4, 0, 0},      //0xF9
	{nop, AM_IMPLIED,       1, 2, 0, 0},      //0xFA
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0xFB
	{jam, AM_IMPLIED,       0, 0, 0, 0},      //0xFC
	{sbc, AM_ABSOLUTE_X,    3, 4, 0, 0},      //0xFD
	{inc, AM_ABSOLUTE_X,    3, 7, 0, 1},       //0xFE
        {jam, AM_IMPLIED,       0, 0, 0, 0},       //0xFF

#endif	/* 6502_OPCODEMAP_H */

